// 货物管理
<template>
  <div class="container card">
    <el-tabs v-model="cargoActiveName" type="card" @tab-click="handleClick">
    <el-tab-pane label="数量录入表" name="input">
      <vInput v-if="input" />
    </el-tab-pane>
    <el-tab-pane label="重量展示表" name="weight">
      <weight v-if="weight" />
    </el-tab-pane>
    <el-tab-pane label="汇总表" name="confluence">
      <confluence v-if="confluence" />
    </el-tab-pane>
  </el-tabs>
  </div>
</template>

<script>
import vInput from './input'
import confluence from './confluence'
import weight from './weight'

export default {
  name: '',
  components: {
    vInput,
    confluence,
    weight

  },
  props: {},
  data () {
    return {
      cargoActiveName: 'input',
      input: true,
      weight: false,
      confluence: false
    }
  },
  computed: {},
  watch: {},
  created () {},
  mounted () {},
  methods: {
    handleClick (tab, event) {
      // console.log(tab, event)
      switch (tab.index) {
        case '0':
          this.input = true
          this.weight = false
          this.confluence = false
          break
        case '1':
          this.input = false
          this.weight = true
          this.confluence = false
          break
        case '2':
          this.input = false
          this.weight = false
          this.confluence = true
          break
        default:
          console.log('出错了')
          break
      }
    }
  }
}
</script>

<style scoped lang="">

</style>
